﻿using HelixToolkit.Wpf.SharpDX.Animations;
using HelixToolkit.Wpf.SharpDX.Model.Scene;
using System.Collections.Generic;

namespace WpfModelEditor.Core.Plugins
{
    public class Scene
    {
        public List<Animation> Animations { set; get; }
        public SceneNode Root { set; get; }
        public bool HasAnimation { get => Animations != null && Animations.Count > 0; }
    }
    public enum LoadSaveResult
    {
        Success,
        Error,
        NotSupport,
    }
    public class IoFormat
    {
        /// <summary>
        /// 格式名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 扩展名, 小写
        /// </summary>
        public string Ext { get; set; }
    }
    public interface IIoPlugin : IBasePlugin
    {
        List<IoFormat> SupportedImportFormats { get; }
        List<IoFormat> SupportedExportFormats { get; }
        LoadSaveResult Load(string path, string ext, out Scene scene);
        LoadSaveResult Save(string path, string ext, Scene scene);
    }
}
